<template>
    <div class="bg-white rounded-8px">
      <div class="p-30px text-24px font-600 rounded-8px">{{lawDetail.post_title}}</div>
      <div class="text-16px px-30px pb-30px text-gray-500">{{ lawDetail.published_time }}</div>
    </div>
    <div class="bg-white rounded-8px mt-10px">
      <div class=" p-30px">
        <div v-html="lawDetail.post_content"></div>
      </div>
    </div>
    
  </template>
  
  <script setup>
    import { ref,onMounted,computed,watch, nextTick } from 'vue'
    import { useRoute,useRouter } from 'vue-router'
    import { systemApi,userApi,httpApi } from '../../api/api'
    import { configStore } from '../../stores/config'
    import { Minus } from '@element-plus/icons-vue';
    import DOMPurify from 'dompurify';
    import { ElMessage } from 'element-plus';
  
    const config = configStore();
    //const lessonData = ref({});
    const route = useRoute()
    const law_id = ref(route.query.id)
    const router = useRouter()
    const lawDetail = ref({})
  
    const init = async() => {
        console.log("法规id",law_id.value)
      let res = await httpApi.getStatuteDetail({id:law_id.value})
      if(res.code){
        lawDetail.value = res.data
        console.log("法规详情",lawDetail.value)
      }
  
  
    }
  
    onMounted(()=>{
      init()
    })
  
  </script>
  <style scoped>
    .linkText{cursor: pointer;}
  </style>